package edu.wpi.cs509.ui.simulators;

import edu.wpi.cs509.representation.Location;
import edu.wpi.cs509.representation.PlayerPiece;
import edu.wpi.cs509.ui.intfc.GameEventNotify;
import edu.wpi.cs509.ui.intfc.GameInterface;

public class SimGameEventNotifyHandler implements GameEventNotify {

	private GameInterface game;
	private AI ai;
	
	// block default constructor	
	public SimGameEventNotifyHandler( AI ai ) {
		this.ai = ai;
	}
	
	public void setGameInterface( GameInterface game ) {
		this.game = game;
	}
	
	@Override
	public void notifyPieceMoved(PlayerPiece piece, Location from, Location to) {
		// TODO
	}

	@Override
	public void notifyPiecePlaced(PlayerPiece piece, Location location) {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyPieceRemoved(PlayerPiece piece, Location loc) {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyRefreshGameBoard() {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyGameStarted() {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyGameOver(boolean winner) {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyOpponentJoined() {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyOpponentQuit() {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyOpponentReady() {
		//TODO 
	}

	@Override
	public void notifyItsYourTurn() {
		//JFrame dialog = new JFrame();
		//JOptionPane.showMessageDialog(dialog,
		//    "It's the Simulator's Turn to Move", "Game Simulator",
		//    JOptionPane.INFORMATION_MESSAGE);
		
		ai.move( game );
	}

	@Override
	public void notifyFailure(FailureReason reason) {
		// TODO Auto-generated method stub

	}

	@Override
	public void notifyAttack(PlayerPiece attacker, Location from,
			PlayerPiece defender, Location to) {
		// TODO Auto-generated method stub
		
	}

}
